A multi-strategy improved tree–seed algorithm for numerical optimization and engineering optimization problems

Tree–seed algorithm is a stochastic search algorithm with superior performance suitable for solving continuous optimization problems. However, it is also prone to fall into local optimum and slow in convergence. Therefore, this paper proposes an improved tree–seed algorithm based on pattern search, dimension permutation, and elimination update mechanism (PDSTSA). Firstly, a global optimization strategy based on pattern search is used to promote detection ability. Secondly, in order to maintain the diversity of the population, a random mutation strategy of individual dimension replacement is introduced. Finally, the elimination and update mechanism based on inferior trees is introduced in the middle and later stages of the iteration. Subsequently, PDSTSA is compared with seven representative algorithms on the IEEE CEC2015 test function for simulation experiments and convergence curve analysis. The experimental results indicate that PDSTSA has better optimization accuracy and convergence speed than other comparison algorithms. Then, the Wilcoxon rank sum test demonstrates that there is a significant difference between the optimization results of PDSTSA and each comparison algorithm. In addition, the results of eight algorithms for solving engineering constrained optimization problems further prove the feasibility, practicability, and superiority of PDSTSA.

www.nature.com/scientificreports/ introduced, and the detection movement and pattern movement mechanisms are introduced into the global search stage, which effectively improves the detection ability and convergence speed of the algorithm. Secondly, a random mutation strategy of individual dimension permutation is introduced to enable individuals to mutate in a round of iterations to enhance the diversity of population positions. Finally, in the middle and late iterations, using the elimination update mechanism removes individuals with poor quality, and then generates fresh individuals with search potential to supplement the population, thereby enhancing the quality of the solution and improving the search performance of the algorithm. Eight representative algorithms are tested on 15 functions with different optimization characteristics in the CEC2015 suite for function extremum optimization in different dimensions. The optimization results indicate that the optimization accuracy and convergence speed of PDSTSA are significantly improved. The results of solving the two engineering optimization problems of alkylation unit optimal operation design and industrial refrigeration system design show that PDSTSA has good feasibility and applicability in dealing with engineering optimization problems. The rest of this paper is organized as follows: "Related work" section provides relevant work, and "Basic tree-seed algorithm" section introduces a basic tree-seed algorithm. In "Improved strategies of PDSTSA" and "PDSTSA flow" sections respectively introduce the improved algorithm PDSTSA and algorithm process. In "Simulation experimental data analysis" section conducted simulation experiments and analyzed the solution results of PDSTSA on CEC2015 and engineering constrained optimization problems. Finally, in "Conclusion" section, the content of the paper and its future prospects are summarized.

Related work
Optimization problems exist in many fields in the real world, and some problems require a lot of computation and have multiple limitations. Finding the optimal solution to these problems is challenging. And no algorithm can solve all problems, and the innovation and improvement of algorithms is a continuous process. Like other fundamental heuristic algorithms, TSA also has problems such as being prone to falling into local optima, unstable solution results, and imbalanced exploration and development capabilities. Therefore, many scholars have made corresponding improvements to address the shortcomings of TSA, with the aim of reducing the shortcomings of existing methods and improving the algorithm's ability to solve different optimization problems.
Gharehchopogh et al. 14 made a comprehensive review of TSA and its applications in different fields, covering many documents on the hybridization, improvement, mutation, and optimization of TSA.
Jiang et al. 15 introduced hierarchical gravity learning and a stochastic-based migration mechanism to prevent the algorithm from getting into local optimal, enhance the population diversity, and better contribute to the balance between exploration and exploitation.
Beşkirli et al. 16 introduced a tournament method to select the tree that generates seeds and optimized the search trend parameters to enable the algorithm to find more high-quality solutions in search space, improving the optimization accuracy and high-dimensional solution ability of the algorithm.
Babalik et al. 17 used Deb's rule to select the trees and seeds that survived in the next iteration, which had a good effect in minimizing the benchmark function and solving engineering constraint problems.
Jiang et al. 18 presented an improved algorithm that dynamically determines the search trend and the number of seeds based on a feedback mechanism, which balances the algorithm's global search and local search capabilities and improves the optimization efficiency.
Kiran et al. 19 put forward four different approaches to improve tree and seed quality, significantly increasing optimization efficiency.
Ding et al. 20 introduced the Lévy search mechanism to prevent the algorithm from falling into the local optimum and introduced the negative feedback mechanism into the seed update formula to further improve the search accuracy of high-dimensional optimization.
Horng et al. 21 embedded ordinal optimization into TSA, which has good computational efficiency and quality in solving probability-constrained simulation optimization problems.
Cinar et al. 22 improved TSA by using logic gates and similarity measurement techniques and solved the optimization problem with continuous structure solution space, showing good solution quality and robustness of the algorithm.
Gungor et al. 23 used five update rules and one wilting process to obtain trees and seeds, which enhanced the global search and local search ability of the algorithm and performed well in solving high-dimensional continuous problems.

Basic tree-seed algorithm
In basic TSA, the specific algorithm flow is as follows: Step 1: Initialize the location of each tree in the population. Use Eq. (1) to generate a feasible solution as the location of the initial tree T i,j (i = 1, 2 . . . N, j = 1, 2 . . . D).
where N is the population size of the tree, D is the spatial dimension, and T i,j refers to the location of the jth dimension for the ith tree. L j,min and H j,max are the lower and upper bounds of the jth dimension, respectively, and r indicates an N × D matrix composed of uniformly distributed random numbers between (0, 1).
Step 2: Enter the iteration, compute the fitness value of each tree according to the objective function, and then select the tree with the best location.
Step 3: Determine the number of seeds each tree produces according to Eq. (2).
(1) www.nature.com/scientificreports/ where fix is a function that rounds an element to the nearest integer toward zero, low refers to the minimum number of seeds produced from a tree, and its value is N × 10% , high refers to the maximum number of seeds produced from a tree, and its value is N × 25%.
Step 4: For each tree, the location of each seed is generated through Eqs. (4) and (5).
In Eq. (3), rnd represents a random number in the range of (0, 1), so α i,j represents the scaling factor randomly generated in the range of (− 1, 1). The value of ST in Eqs. (4) and (5) are 0.1, S i,j represents the jth dimension of the current seed generated for the ith tree, B j is the jth dimension of the best tree location, and T r,j refers to the jth dimension of the rth tree randomly selected from the tree population, where i and r are different indices.
Step 5: Compute the fitness value of all seeds generated by the tree through objective function, select the optimal seed, and compare it with the current tree. If the seed is better than the tree, this seed will replace the tree.
Step 6: Judge whether the termination conditions are met. If yes, output the final result; Otherwise, go to step 2 for the next iteration.

Improved strategies of PDSTSA
Global optimization mechanism based on pattern search. In TSA, the global search is a random search based on the current position and any random individual. During the optimization process, the movement of the individual has no directionality, resulting in a slow overall convergence speed. The pattern search method 24 is a direct search method that does not rely on derivatives, and its two critical steps are detection movement and pattern movement. Detection movement is changing the value on a single dimension of an individual to move it in a positive or negative direction for a specified step size. The pattern movement is to accelerate the search along the direction of fitness value decline. The pattern search method is relatively flexible in its search process, and the search trend is directional. Inspired by the pattern search method, this paper proposes a global optimization strategy based on pattern search in PDSTSA, which introduces the detection movement and pattern movement mechanism into the global search stage, effectively improving the detection ability and convergence speed of the algorithm.
For the detection movement process, it is required that in the global search stage, the position formula of seeds generated by a tree is divided into positive direction search and negative direction search based on step size. For the pattern moving process, initialize the seeds of all trees to search in the positive direction of step size. If a new seed replaces the tree after one iteration, the tree is still searching in the positive direction in the next iteration. If the current tree does not produce a better seed, the tree will search in the negative direction of the step size in the next iteration and reduce the search step size by a certain proportion. In this way, the algorithm can quickly determine the direction in which the fitness value decreases and effectively improve the convergence speed of the algorithm. In the iterative process, the search step size is gradually reduced, thereby increasing the local search ability in the later stage and improving the optimization accuracy of the algorithm.
Set a judgment flag jud to determine whether a seed replaced a tree in the previous iteration. Initialize the jud of all trees to 1. If a better seed replaces the tree after one iteration, let jud = 0 . If the tree has not been replaced, let jud = 0 . According to the value of jud , determine the direction along which the formula searches for the position of the seed generated by the next iteration of the current tree. The search position of the seed in the positive and negative directions is shown in Eqs. (6) and (7).
In Eqs. (6) and (7), T i,j denotes the jth dimension position value of the ith tree, rand is a random number uniformly distributed in the (0, 1) interval. S represents the control factor of the search step length, and its initial value is 2, which decreases in a certain proportion during the optimization process. where k is a constant less than 1, and the value in this paper is 0.97. If the tree doesn't produce better seeds, S decreases by a certain proportion according to Eq. (8). By reducing the step length, the pattern search process is more precise, and the moving direction of the population is closer to the optimal direction. At the same time, the seeds are deeply searched in the small neighborhood of the tree in the later period of iteration, which effectively improves the optimization accuracy of the algorithm.
Random mutation mechanism of individual dimension. In order to maintain the overall search capability of the population, this paper introduces a random mutation strategy of individual dimension permutation 25 in PDSTSA, which enables individuals to mutate during the process of one round of iteration to increase the diversity of population positions and enhance the ability of individuals to jump out of local minima. In PDSTSA, the position obtained by comparing and replacing the ith tree with the seed is set as T i , and (2) ns = fix(low + (high − low) × rand) + 1 www.nature.com/scientificreports/ its fitness value is obj_T i . Two of the D dimensions of this tree are randomly selected for exchange. Repeat this operation for m times to obtain the mutated position T i _mutation . Calculate the fitness value obj_T i _mutation after mutation, and if obj_T i _mutation < obj_T i , set T i = T i _mutation . In this way, the optimal individuals are retained after the mutation is completed, and the population quality is raised. While increasing the diversity of the population, it can also improve the convergence speed, in which the number of permutation m is a random integer on 1,4 . Elimination and update mechanism based on poor location. In the biological evolution process of nature, competitive individuals can survive, and uncompetitive individuals will be eliminated. The evolutionary algorithm population is also divided into competitive individuals and uncompetitive individuals. This paper introduces an elimination update mechanism based on poor position in the PDSTSA. If the fitness value obtained by an individual is poor compared to the majority of the population, it indicates that the adaptability in competition is poor and there is no ability to search for the optimal position. Therefore, those individuals with poor quality are eliminated. Then fresh individuals with search potential are generated to supplement the population, thereby enhancing the quality of the solution and improving the search performance of the algorithm.
The specific operation strategy is as follows: After the tree T i passes the individual dimension mutation strategy, if the current iteration number is more than half of the total iteration number, then the update strategy for T i is executed. The population is sorted in ascending order according to the fitness value. The individuals in the front 2 3 are set as the dominant group, and the rest 1/3 individuals are the inferior groups. Judge whether the current tree is a disadvantaged group. If so, the tree will be eliminated, and then a new individual will be generated according to Eq. (9) to replace the eliminated tree and add it to the population.
where T i represents the position of the current tree, and T k represents the position of the tree randomly selected from the dominant group. α is the random parameter matrix calculated according to Eq. (3).
At the later stage of the iteration, the individuals in the population have evolved to a better position, so although T k is only a random position in the dominant population, the position near T k still has better competitiveness and search potential. After the elimination and update mechanism of inferior trees, the overall quality of the population has been improved, further improving the search efficiency and convergence accuracy of the algorithm in the later stage of iteration.

PDSTSA flow
PDSTSA algorithm is described as follows:

Simulation experimental data analysis
In this section, the extensive and authoritative IEEE CEC2015 26 test function suite is used to evaluate the performance of the PDSTSA algorithm proposed in this paper, and PDSTSA is compared with the basic tree-seed algorithm (TSA, 2015) 7 , the improved TSA based on intelligent search mechanisms (NTSA, 2021) 19 , the enhanced TSA via feedback mechanism (fbtsa, 2020) 18 , the whale algorithm (WOA, 2016) 5 , the elite reverse gold sinusoid whale algorithm (EGSWOA, 2019) 27 , the grey wolf algorithm (GWO, 2014) 28  Optimization accuracy analysis. In order to test the optimization ability of the PDSTSA, this paper sets the dimensions of test functions F1-F15 as D = 30/50/100, respectively. In order to ensure the fairness and objectivity of the experiment, the eight algorithms are independently run 30 times under the same conditions, the population size is 100, and the maximum iteration times is 1000. The experimental test platform is Windows 10 operating system, and the programming language is Matlab R2018a. In terms of algorithm parameter setting, no additional parameters need to be set for the eight algorithms, which is consistent with the original literature and algorithm source code. Table 2 shows the average, optimal, and worst values of the optimization results obtained by each algorithm running 30 times under the conditions of 30, 50, and 100 dimensions. Among them, the best results of each data are marked in bold. From Table 2, it can be seen that on the unimodal test functions F1 and F2, the average, optimal, and worst values of PDSTSA are significantly better than other comparison algorithms in different dimensions for F1. For F2, when D = 30/50, the optimal value of PDSTSA can converge to the theoretical optimal value, and when D = 100, the average and worst values of PDSTSA are better than the comparison algorithm, and the optimal value is only second to JADE, demonstrating superior global exploration ability. On the multimodal test functions F3-F5, for F3 and F5, the average value, the optimal value, and the worst value obtained by PDSTSA under the condition of D = 30/50 are the best of the eight algorithms. For F4, the optimization results obtained by PDSTSA under the condition of D = 100 are also better than the comparison algorithm. For the other dimensions of these three functions, PDSTSA is one of the eight algorithms with better results, which is superior to most comparison algorithms. On the mixed functions F6-F8, for F6 and F7, PDSTSA outperforms the comparison algorithm in terms of average, optimal, and worst values under different dimensional conditions, demonstrating superior optimization performance and dimensional adaptability. For F8, PDSTSA is the best among the eight algorithms under the condition of D = 30/100, and under the condition of D = 50, the optimal value of PDSTSA is second only to JADE, and the average and worst values are better than other algorithms. On the composition functions F9-F15, for F10 and F11, PDSTSA's solution results under the condition of D = 30/50/100 are the best among the eight algorithms, with high optimization accuracy and stability. For F9, F12, and F14, the average, the best or worst value of multiple optimization results of PDSTSA under different dimensions is the best of the eight algorithms, and the overall performance is better. For F13 and F15, the optimization results of the eight algorithms are similar, and the solving ability is equivalent. From the experimental results of each algorithm solving all 15 test functions in the CEC2015 suite, it can be seen that PDSTSA shows a relatively superior optimization effect as a whole.
From the above analysis, it is clear that PDSTSA has sufficient exploration and exploitation capabilities to solve unimodal, multimodal, hybrid, and combinatorial problems. Compared with other algorithms, its optimization accuracy, solution stability, and adaptability to different functions and dimensions have obvious advantages, and PDSTSA has obtained more competitive results.
Convergence curve analysis. The convergence curve intuitively reflects the algorithm's ability to jump out of the local extreme value and the speed of downward convergence, which is an important indicator to measure the performance of the algorithm. The following is a comparison chart of convergence curves of eight algorithms www.nature.com/scientificreports/ for solving 15 functions in the CEC2015 suite when the dimension is 100, as shown in Fig. 1, and Fig. 1a-o corresponds to the convergence curve of functions F1-F15, respectively. The convergence curves of the above 15 functions clearly show the variation trend of fitness values of PDSTSA, TSA, fbtsa, NTSA, WOA, and EGSWOA in the evolution process. It can be shown by the convergence curves of different functions that the convergence performance of the PDSTSA proposed in this paper is significantly better than other algorithms in most test functions.
In Fig. 1g,i,k,n, PDSTSA always has a faster convergence speed and higher optimization accuracy. TSA, WOA, EGSWOA, GWO and JADE converge slowly and quickly fall into local extreme values and cannot jump out, while fbtsa and NTSA converge slightly faster than TSA, WOA, EGSWOA, GWO and JADE. In Fig. 1b, the rate of convergence of PDSTSA is better than TSA, fbtsa, WOA, EGSWOA and GWO, and slightly inferior to JADE. In Fig. 1a,d, although the convergence speed of fbtsa, NTSA and JADE is faster than PDSTSA in the early stage of the iteration, in the middle and late stages of the iteration, PDSTSA can get rid of local extremum. The convergence speed and optimization accuracy are gradually better than fbtsa, NTSA and JADE, while TSA, WOA, EGSWOA and GWO fall into local optimization in the early stage of the iteration until the end of the iteration. In Fig. 1e, fbtsa, TSA, WOA, EGSWOA and JADE converge to local extreme value at the early stage of the iteration and cannot jump out. Although the convergence rate of NTSA is faster in the first 900 generations, the convergence rate is lower than PDSTSA when the iteration reaches 1000, and PDSTSA still has a downward convergence trend. Although GWO has a downward trend in the later stage, its optimization accuracy is not as good as PDSTSA within 1000 iterations. In Fig. 1f,h,j,l, the convergence speed of NTSA, TSA, WOA, EGSWOA, GWO and JADE is relatively slow. Although the convergence speed of fbtsa is faster than PDSTSA in the early stage of the iteration, PDSTSA can jump out of the local extreme value in the middle and late stages of the iteration, and the convergence speed and optimization precision are gradually better than fbtsa. In Fig. 1c,m,o, the convergence speed of PDSTSA is slightly slower than that of NTSA, but faster than the other six algorithms.
The above results and analysis show that the optimization accuracy and convergence speed of PDSTSA under high-dimensional conditions are significantly better than the other seven algorithms. This is mainly because the PDSTSA introduces the detection movement and pattern movement mechanism into the global search stage, which makes the individual search directional. At the same time, it reduces the step length S in the optimization process, enhances the local search ability of the individual in the later stage of the iteration, and effectively improves the detection ability and convergence speed of the algorithm. The introduction of a random mutation strategy of individual dimension permutation increases the diversity of the population and improves the optimization performance of the algorithm. In the middle and later stages of the iteration, the elimination and update mechanism of inferior trees is used to obtain individuals with more search potential, enhance the ability of PDSTSA to jump out of the local extreme, and further improve search efficiency and convergence accuracy.  www.nature.com/scientificreports/ To sum up, PDSTSA has better optimization performance under both low-dimensional and high-dimensional conditions. Its solution accuracy, convergence speed, and optimization stability are better than those of TSA, NTSA, fbtsa, WOA, EGSWOA, GWO and JADE. The improvement mechanism of PDSTSA is obviously effective and superior.
Wilcoxon rank sum test. Wilcoxon rank sum test 30 can statistically analyze the significant difference between the two algorithms, which is a non-parametric test method. In this paper, the Wilcoxon rank sum test method is used to determine whether there is a significant difference between the experimental results of PDSTSA and the comparison algorithms. The data used in the rank sum test is the result of each algorithm running independently 30 times on the CEC2015 test function under 100-dimensional conditions. Table 3 shows the p-value of the rank sum test between PDSTSA and each comparison algorithm. When p < 0.05 , the null hypothesis is rejected, there is a significant difference between the two algorithms. The symbols "+", "=" and "−" after each data in the table indicate that the solution result of PDSTSA is superior to, equivalent to, and inferior to other corresponding algorithms in the table.
It can be seen from the statistical results in Table 3 that the p-value of PDSTSA and the other seven comparison algorithm are less than 0.05, and most of the symbols are "+", indicating that PDSTSA has significant differences from other algorithms, and is obviously superior than other comparison algorithms.
Applications in solving engineering optimization problems. In order to further verify the application ability and effectiveness of the proposed algorithm, the PDSTSA algorithm and the above seven comparison algorithms are used to solve engineering constrained optimization problems. When solving these engineering problems, the operation environment and parameter settings of each algorithm are the same as those in "Test function" section. Each algorithm runs independently 30 times to obtain the average value, the optimal value, and the worst value of its optimization design results. The design problems of alkylation unit operation and industrial refrigeration have complex design variables and constraints, which can well test the ability of the algorithm to solve the engineering constraint optimization problem.
Constraint treatment strategy. The mathematical model of engineering problems has many linear, nonlinear, equality, and inequality constraints. Using the evolutionary algorithm to solve constraint problems not only requires the performance of the algorithm but also depends on the constraint processing method. In this paper, the easy and effective outer point penalty function method is used to deal with the constraints in engineering problems and the constrained optimization problem is transformed into an unconstrained problem.
Firstly, the equality constraint is transformed into the following inequality constraint. The method of dealing with the equality constraint h(x) is as follows: where x is the candidate solution of the population, δ is the tolerance value of the equality constraint, generally taking a small positive number.
Then, the degree function V i (x) of the candidate solution x in the population violating the ith constraint is expressed as: www.nature.com/scientificreports/ where q is the number of inequality constraints, and the number of equality constraints is (m − q) . If the candidate solution x violates the constraint, there must be V i (x) > 0 . If the candidate solution doesn't violate the constraint, then V i (x) = 0 . The penalty fitness function is constructed by introducing a penalty term into the objective function. The definition is as follows: where, k is the penalty coefficient, and its value is a relatively large positive number. It can be found that the penalty value m i=1 k × V i (x) is always a non-negative number. After replacement, the objective function value of the infeasible solution is greater than that of the feasible solution, effectively distinguish the feasible solution from the infeasible solution.
Solution and analysis of engineering constrained optimization problems.
The optimized operation of the alkylation unit 31 is widespread in the petroleum industry. The primary purpose of this problem is to increase the octane number of the olefin feedstock reacted with isobutene under acidic conditions. This problem is a complex optimization problem containing seven design variables and fourteen constraints. The design variables are olefin feed rate x 1 , acid addition rate x 2 , alkylate yield x 3 , acid strength x 4 , motor octane number x 5 , external isobutene to olefin ratio x 6 , F-4 performance number x 7 . The mathematical model is defined as follows: Design variables: Maximize: Subject to: With bounds: g 13 (x) = 6.25x 1 x 6 + 6.25x 1 − 7.625x 3 − 100000 ≤ 0 www.nature.com/scientificreports/ We first transform the maximization problem into a minimization problem to solve it. Table 4 shows the average, best, and worst values of the optimization results obtained by solving the optimization operation design problem of the alkylation unit after 30 runs of eight algorithms. From the data in the table, it can be seen that the average, optimal, and worst values obtained by PDSTSA are the theoretical optimal values and are superior to the other seven algorithms, indicating that the PDSTSA algorithm has excellent optimization ability and stability. The final design result of PDSTSA is the best and has a good effect on the optimization of the alkylation process.
(B) Design of industrial refrigeration system. www.nature.com/scientificreports/ With bounds: Table 5 shows the average, best, and worst values of the optimization results obtained by the eight algorithms that have been run independently 30 times to solve the optimization design problem of the industrial refrigeration system. It can be seen from the data in the table that, except for the relatively poor WOA solution results, the final results obtained by other algorithms are relatively similar, but the average value, the optimal value, and the worst value of PDSTSA are all theoretical optimal values. In contrast, other algorithms cannot achieve the theoretical optimal value, indicating that the algorithm in this paper performs better in solving the constrained optimization problems of complex engineering design.

Conclusion
In order to improve the shortcomings of TSA, which is easy to fall into local optimum and slow convergence speed, this paper proposes the PDSTSA algorithm. In terms of algorithm improvement, firstly, a pattern search strategy is introduced in the global search stage, and the population explores along the direction of making the fitness value tend to the optimal value, improving the algorithm's convergence speed. Then, individuals undergo random mutation in a round of iterations, increasing the diversity of population positions. Finally, the individuals that still don't have the search ability in the middle and later stages of the iteration are eliminated, and then the new individuals with search potential are supplemented to improve the quality of the solution and the ability of the algorithm to jump out of the local extreme. In terms of global optimization, PDSTSA and seven other comparison algorithms with superior performance are simulated on the IEEE CEC2015 test function set suite. From the optimization accuracy analysis and convergence curve comparison of the experimental results, it can be seen that PDSTSA significantly improved optimization accuracy and convergence speed. Then, the Wilcoxon rank sum test proves a significant difference between the optimization results of PDSTSA and the comparison algorithms. Finally, in engineering design applications, the advantages and potential of PDSTSA are further demonstrated by solving engineering design problems. In the follow-up work, we will conduct more in-depth research on TSA, continue to improve and perfect the algorithm in this paper, and apply it to more practical optimization problems reasonably to improve its optimization performance and expand its application fields continuously.

Data availability
The datasets generated during and analyzed during the current study are available from the corresponding author on reasonable request.